<template>
  <!-- 查询模块 -->
  <div class="nursearch">
    <div class="nursearch1">
      <div><p>老人姓名</p><vxe-input class="nurseainput" v-model="NameOlder" placeholder="请输入老人姓名" clearable></vxe-input></div>
      <div><p>入住号</p><vxe-input class="nurseainput" v-model="IdCard" placeholder="请输入入住号"  clearable></vxe-input></div>
      <div><p>身份证号</p><vxe-input class="nurseainput" v-model="OlderCard" placeholder="请输入老人身份证号"  clearable></vxe-input></div>
    </div>
    <div class="nursearch2">
      <vxe-button class="nurserbtn" content="查询" status="primary" ></vxe-button>
    </div>
    
  </div>
  <!-- 表格模块 -->
  <div>
    <vxe-table
    :data="tableData">
    <vxe-column type="seq" width="60"></vxe-column>
    <vxe-column field="name" title="老人姓名"></vxe-column>
    <vxe-column field="sex" title="入住号"></vxe-column>
    <vxe-column field="age" title="老人身份证"></vxe-column>
    <vxe-column field="age" title="养转医医嘱"></vxe-column>
    <vxe-column field="age" title="养转医时间"></vxe-column>
    <vxe-column field="age" title="操作医生"></vxe-column>
    <vxe-column field="age" title="操作">
        <template #default="{ row }">
          <vxe-button type="text" @click="transfer(row)">养转医</vxe-button>
        </template>
    </vxe-column>
  </vxe-table>
  </div>
   
  </template>
  
  
  <script setup>
    import {useRouter} from 'vue-router'//路由
    const router = useRouter()
    import { ref } from 'vue'
    //表格信息
    const tableData = ref([
      { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
      { id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
      { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
      { id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' }
    ])
    // 查询参数
    const NameOlder = ref('')//老人姓名
    const IdCard = ref('')//入住卡号
    const OlderCard =ref("")//老人身份证号
    //养转医
    const transfer = (row) => {
      router.push('/checkin_home')
    }
  </script>
 
  
  <style scoped></style>
<style lang="less">
.nursearch{
  width: 100%;
  height: 13vh;
  display: flex;
  justify-content: space-between;
  .nursearch1{ 
    display: flex;
    width: 80%;
    div{
      width: 35%;
      display: flex;
      p{
        width: 90px;
        height: 34px;
        line-height: 34px;
      }
      .nurseainput{
        width: 200px;
      }
    }
  }
  .nursearch2{
    .nurserbtn{
      width: 100px;
      border-radius: 11px;
    }
  }
}

</style>